﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Core.CurrentFramework.Repository.Migrations
{
    public partial class _20200321 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "Users",
                keyColumn: "id",
                keyValue: 2);

            migrationBuilder.DropColumn(
                name: "UserName",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "UserPwd",
                table: "Users");

            migrationBuilder.AddColumn<int>(
                name: "Age",
                table: "Users",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<DateTime>(
                name: "Birthday",
                table: "Users",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "Email",
                table: "Users",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Hight",
                table: "Users",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Hobby",
                table: "Users",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "IndexPath",
                table: "Users",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Name",
                table: "Users",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Note",
                table: "Users",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Phone",
                table: "Users",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Sex",
                table: "Users",
                nullable: true);

            migrationBuilder.InsertData(
                table: "Users",
                columns: new[] { "id", "Age", "Birthday", "Email", "Hight", "Hobby", "IndexPath", "Name", "Note", "Phone", "Sex" },
                values: new object[,]
                {
                    { 3, 19, new DateTime(2020, 3, 21, 2, 4, 10, 967, DateTimeKind.Local).AddTicks(5470), "12@qq.com", "160cm", "篮球", "baidu.com", "留影", "x", "13142021102", "男" },
                    { 4, 19, new DateTime(2020, 3, 21, 2, 4, 10, 969, DateTimeKind.Local).AddTicks(5911), "12@qq.com", "160cm", "篮球", "baidu.com", "留影", "x", "13142021102", "男" },
                    { 5, 19, new DateTime(2020, 3, 21, 2, 4, 10, 969, DateTimeKind.Local).AddTicks(5998), "12@qq.com", "160cm", "篮球", "baidu.com", "留影", "x", "13142021102", "男" },
                    { 6, 19, new DateTime(2020, 3, 21, 2, 4, 10, 969, DateTimeKind.Local).AddTicks(6001), "12@qq.com", "160cm", "篮球", "baidu.com", "留影", "x", "13142021102", "男" },
                    { 7, 19, new DateTime(2020, 3, 21, 2, 4, 10, 969, DateTimeKind.Local).AddTicks(6004), "12@qq.com", "160cm", "篮球", "baidu.com", "留影", "x", "13142021102", "男" },
                    { 8, 19, new DateTime(2020, 3, 21, 2, 4, 10, 969, DateTimeKind.Local).AddTicks(6007), "12@qq.com", "160cm", "篮球", "baidu.com", "留影", "x", "13142021102", "男" }
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "Users",
                keyColumn: "id",
                keyValue: 3);

            migrationBuilder.DeleteData(
                table: "Users",
                keyColumn: "id",
                keyValue: 4);

            migrationBuilder.DeleteData(
                table: "Users",
                keyColumn: "id",
                keyValue: 5);

            migrationBuilder.DeleteData(
                table: "Users",
                keyColumn: "id",
                keyValue: 6);

            migrationBuilder.DeleteData(
                table: "Users",
                keyColumn: "id",
                keyValue: 7);

            migrationBuilder.DeleteData(
                table: "Users",
                keyColumn: "id",
                keyValue: 8);

            migrationBuilder.DropColumn(
                name: "Age",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "Birthday",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "Email",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "Hight",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "Hobby",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "IndexPath",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "Name",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "Note",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "Phone",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "Sex",
                table: "Users");

            migrationBuilder.AddColumn<string>(
                name: "UserName",
                table: "Users",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UserPwd",
                table: "Users",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.InsertData(
                table: "Users",
                columns: new[] { "id", "UserName", "UserPwd" },
                values: new object[] { 2, "xx", "xx" });
        }
    }
}
